package com.shop.flowershopmanager.service;

import com.shop.flowershopmanager.dao.CategoryDao;
import com.shop.flowershopmanager.entity.Category;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CategorImpl implements CategoryService {
    @Resource
    private CategoryDao categoryDao;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Category> getAllCategory() {
        return categoryDao.getAllCategory();
    }
}
